package com.obj;

import org.openjdk.jol.info.ClassLayout;

/**
 * @program: demo
 * @description: 测试
 * @author: zxb
 * @date: 2021-01-20 21:52
 **/
public class ObjectTest {
    public static void main(String[] args) {
        D d = new D();
        /**
         * ClassLayout.parseInstance(object).toPrintable()：查看对象内部信息.
         * GraphLayout.parseInstance(object).toPrintable()：查看对象外部信息，包括引用的对象.
         * GraphLayout.parseInstance(object).totalSize()：查看对象总大小.
         */

        int[] a = {1};

        System.out.println(ClassLayout.parseInstance(a).toPrintable());
    }
}
